{% load forum_tags %}

{% load forum_tags %}


<div class="ui top attached text menu" id="menu-topics">
    <div class="ui inverted dimmer"></div>
    {% if user.is_authenticated %}

        <a class="item messages {% activate tab "messages" %}" href="{% url 'inbox' %}">
            {% if counts.message_count %}
                <div class="ui green label"><i class="envelope icon"></i>Messages {{ counts.message_count }}
                </div>
            {% else %}
                <i class="envelope icon"></i>Messages
            {% endif %}

        </a>

        <a class="item votes {% activate tab "myvotes" %}" href="{% url 'myvotes' %}">
            {% if counts.vote_count %}
                <div class="ui pink label"><i class="heart icon"></i> Votes {{ counts.vote_count }}</div>
            {% else %}
                <i class="heart icon"></i> Votes
            {% endif %}
        </a>

        <a class="item {% activate tab "myposts" %}" href="{% url 'myposts' %}">
            <i class="comments icon"></i> My Posts

        </a>

        <a class="item {% activate tab "mytags" %}" href="{% url 'mytags' %}">
            <i class="tags icon"></i> My Tags

        </a>
        <span class="menu-tablet_med_xsmall"></span>

        <a class="item  {% activate tab "following" %}" href="{% url 'following' %}">
            <i class="eye icon"></i> Following
        </a>

        <a class="item {% activate tab "bookmarks" %}" href="{% url 'bookmarks' %}">
            <i class="bookmark icon"></i> Bookmarks
        </a>

    {% endif %}
    {% if request.user.profile.is_moderator %}
        <a class="item {% activate tab 'activity' %} " href="{% url 'view_logs' %}">
            <i class="info circle icon"></i> Activity {% if counts.mod_count %}{{ counts.mod_count }}{% endif %}
        </a>
    {% endif %}


    <div class="right menu" id="login-opts">

        {% if user.is_authenticated %}
            <a class="item {{ user.profile.css }} {% activate tab "profile" %}"
               href="{% url 'user_profile' user.profile.uid %}">
                {{ user.profile.name }} {% user_icon user %}

            </a>

            <a class="item {{ user.profile.css }} {% activate tab "logout" %}" href="{% url 'logout' %}">
                <i class="sign-out icon"></i>
                Logout
            </a>

        {% else %}
            <a class="item {% activate tab "login" %}" href="{% url 'login' %}">
                <i class="sign-in icon"></i>Log In</a>

            <a class="item {% activate tab "signup" %}" href="{% url 'signup' %}">
                <i class="user icon"></i> Sign Up</a>
        {% endif %}

        <a class="item {% activate tab "about" %}" href="{% url 'pages' 'about' %}"> <i
                class="info icon"></i>about</a>
        <a class="item  {% activate tab "faq" %}" href="{% url 'pages' 'faq' %}"> <i
                class="question icon"></i> faq
        </a>
    </div>
</div>
